3.876 \(\int \frac {1}{(d+e x) (f+g x)^2 \sqrt {a+b x+c x^2}} \, dx\)

Optimal. Leaf size=340 \[ \frac {e^2 \tanh ^{-1}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{(e f-d g)^2 \sqrt {a e^2-b d e+c d^2}}+\frac {g^2 \sqrt {a+b x+c x^2}}{(f+g x) (e f-d g) \left (a g^2-b f g+c f^2\right )}-\frac {e g \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{(e f-d g)^2 \sqrt {a g^2-b f g+c f^2}}-\frac {g (2 c f-b g) \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{2 (e f-d g) \left (a g^2-b f g+c f^2\right )^{3/2}} \]

[Out]

-1/2*g*(-b*g+2*c*f)*arctanh(1/2*(b*f-2*a*g+(-b*g+2*c*f)*x)/(a*g^2-b*f*g+c*f^2)^(1/2)/(c*x^2+b*x+a)^(1/2))/(-d*
g+e*f)/(a*g^2-b*f*g+c*f^2)^(3/2)+e^2*arctanh(1/2*(b*d-2*a*e+(-b*e+2*c*d)*x)/(a*e^2-b*d*e+c*d^2)^(1/2)/(c*x^2+b
*x+a)^(1/2))/(-d*g+e*f)^2/(a*e^2-b*d*e+c*d^2)^(1/2)-e*g*arctanh(1/2*(b*f-2*a*g+(-b*g+2*c*f)*x)/(a*g^2-b*f*g+c*
f^2)^(1/2)/(c*x^2+b*x+a)^(1/2))/(-d*g+e*f)^2/(a*g^2-b*f*g+c*f^2)^(1/2)+g^2*(c*x^2+b*x+a)^(1/2)/(-d*g+e*f)/(a*g
^2-b*f*g+c*f^2)/(g*x+f)

________________________________________________________________________________________

Rubi [A]  time = 0.39, antiderivative size = 340, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {960, 724, 206, 730} \[ \frac {e^2 \tanh ^{-1}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{(e f-d g)^2 \sqrt {a e^2-b d e+c d^2}}+\frac {g^2 \sqrt {a+b x+c x^2}}{(f+g x) (e f-d g) \left (a g^2-b f g+c f^2\right )}-\frac {e g \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{(e f-d g)^2 \sqrt {a g^2-b f g+c f^2}}-\frac {g (2 c f-b g) \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{2 (e f-d g) \left (a g^2-b f g+c f^2\right )^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[1/((d + e*x)*(f + g*x)^2*Sqrt[a + b*x + c*x^2]),x]

[Out]

(g^2*Sqrt[a + b*x + c*x^2])/((e*f - d*g)*(c*f^2 - b*f*g + a*g^2)*(f + g*x)) + (e^2*ArcTanh[(b*d - 2*a*e + (2*c
*d - b*e)*x)/(2*Sqrt[c*d^2 - b*d*e + a*e^2]*Sqrt[a + b*x + c*x^2])])/(Sqrt[c*d^2 - b*d*e + a*e^2]*(e*f - d*g)^
2) - (g*(2*c*f - b*g)*ArcTanh[(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*Sqrt[c*f^2 - b*f*g + a*g^2]*Sqrt[a + b*x + c*
x^2])])/(2*(e*f - d*g)*(c*f^2 - b*f*g + a*g^2)^(3/2)) - (e*g*ArcTanh[(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*Sqrt[c
*f^2 - b*f*g + a*g^2]*Sqrt[a + b*x + c*x^2])])/((e*f - d*g)^2*Sqrt[c*f^2 - b*f*g + a*g^2])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 730

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(d + e*x)^(m + 1)
*(a + b*x + c*x^2)^(p + 1))/((m + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[(2*c*d - b*e)/(2*(c*d^2 - b*d*e + a*e
^2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b^2 - 4*a*c,
 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && EqQ[m + 2*p + 3, 0]

Rule 960

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && (IntegerQ[p] || (ILtQ[m, 0] &&
ILtQ[n, 0])) &&  !(IGtQ[m, 0] || IGtQ[n, 0])

Rubi steps

\begin {align*} \int \frac {1}{(d+e x) (f+g x)^2 \sqrt {a+b x+c x^2}} \, dx &=\int \left (\frac {e^2}{(e f-d g)^2 (d+e x) \sqrt {a+b x+c x^2}}-\frac {g}{(e f-d g) (f+g x)^2 \sqrt {a+b x+c x^2}}-\frac {e g}{(e f-d g)^2 (f+g x) \sqrt {a+b x+c x^2}}\right ) \, dx\\ &=\frac {e^2 \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{(e f-d g)^2}-\frac {(e g) \int \frac {1}{(f+g x) \sqrt {a+b x+c x^2}} \, dx}{(e f-d g)^2}-\frac {g \int \frac {1}{(f+g x)^2 \sqrt {a+b x+c x^2}} \, dx}{e f-d g}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{(e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)}-\frac {\left (2 e^2\right ) \operatorname {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{(e f-d g)^2}+\frac {(2 e g) \operatorname {Subst}\left (\int \frac {1}{4 c f^2-4 b f g+4 a g^2-x^2} \, dx,x,\frac {-b f+2 a g-(2 c f-b g) x}{\sqrt {a+b x+c x^2}}\right )}{(e f-d g)^2}-\frac {(g (2 c f-b g)) \int \frac {1}{(f+g x) \sqrt {a+b x+c x^2}} \, dx}{2 (e f-d g) \left (c f^2-b f g+a g^2\right )}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{(e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)}+\frac {e^2 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c d^2-b d e+a e^2} (e f-d g)^2}-\frac {e g \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{(e f-d g)^2 \sqrt {c f^2-b f g+a g^2}}+\frac {(g (2 c f-b g)) \operatorname {Subst}\left (\int \frac {1}{4 c f^2-4 b f g+4 a g^2-x^2} \, dx,x,\frac {-b f+2 a g-(2 c f-b g) x}{\sqrt {a+b x+c x^2}}\right )}{(e f-d g) \left (c f^2-b f g+a g^2\right )}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{(e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)}+\frac {e^2 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c d^2-b d e+a e^2} (e f-d g)^2}-\frac {g (2 c f-b g) \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{2 (e f-d g) \left (c f^2-b f g+a g^2\right )^{3/2}}-\frac {e g \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{(e f-d g)^2 \sqrt {c f^2-b f g+a g^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.95, size = 256, normalized size = 0.75 \[ -\frac {-\frac {2 e^2 \tanh ^{-1}\left (\frac {-2 a e+b (d-e x)+2 c d x}{2 \sqrt {a+x (b+c x)} \sqrt {e (a e-b d)+c d^2}}\right )}{\sqrt {e (a e-b d)+c d^2}}+\frac {2 g^2 \sqrt {a+x (b+c x)} (d g-e f)}{(f+g x) \left (g (a g-b f)+c f^2\right )}+\frac {g (g (2 a e g+b d g-3 b e f)+2 c f (2 e f-d g)) \tanh ^{-1}\left (\frac {-2 a g+b (f-g x)+2 c f x}{2 \sqrt {a+x (b+c x)} \sqrt {g (a g-b f)+c f^2}}\right )}{\left (g (a g-b f)+c f^2\right )^{3/2}}}{2 (e f-d g)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((d + e*x)*(f + g*x)^2*Sqrt[a + b*x + c*x^2]),x]

[Out]

-1/2*((2*g^2*(-(e*f) + d*g)*Sqrt[a + x*(b + c*x)])/((c*f^2 + g*(-(b*f) + a*g))*(f + g*x)) - (2*e^2*ArcTanh[(-2
*a*e + 2*c*d*x + b*(d - e*x))/(2*Sqrt[c*d^2 + e*(-(b*d) + a*e)]*Sqrt[a + x*(b + c*x)])])/Sqrt[c*d^2 + e*(-(b*d
) + a*e)] + (g*(2*c*f*(2*e*f - d*g) + g*(-3*b*e*f + b*d*g + 2*a*e*g))*ArcTanh[(-2*a*g + 2*c*f*x + b*(f - g*x))
/(2*Sqrt[c*f^2 + g*(-(b*f) + a*g)]*Sqrt[a + x*(b + c*x)])])/(c*f^2 + g*(-(b*f) + a*g))^(3/2))/(e*f - d*g)^2

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(e*x+d)/(g*x+f)^2/(c*x^2+b*x+a)^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(e*x+d)/(g*x+f)^2/(c*x^2+b*x+a)^(1/2),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [B]  time = 0.02, size = 788, normalized size = 2.32 \[ \frac {b g \ln \left (\frac {\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{2 \left (d g -e f \right ) \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}-\frac {c f \ln \left (\frac {\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{\left (d g -e f \right ) \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}-\frac {e \ln \left (\frac {\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {2 a \,e^{2}-2 b d e +2 c \,d^{2}}{e^{2}}+2 \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (d g -e f \right )^{2} \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}+\frac {e \ln \left (\frac {\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{\left (d g -e f \right )^{2} \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}-\frac {\sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, g}{\left (d g -e f \right ) \left (a \,g^{2}-b f g +c \,f^{2}\right ) \left (x +\frac {f}{g}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(e*x+d)/(g*x+f)^2/(c*x^2+b*x+a)^(1/2),x)

[Out]

-g/(d*g-e*f)/(a*g^2-b*f*g+c*f^2)/(x+f/g)*((x+f/g)^2*c+(b*g-2*c*f)*(x+f/g)/g+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2)+1/2
*g/(d*g-e*f)/(a*g^2-b*f*g+c*f^2)/((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*ln(((b*g-2*c*f)*(x+f/g)/g+2*(a*g^2-b*f*g+c*f^
2)/g^2+2*((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*((x+f/g)^2*c+(b*g-2*c*f)*(x+f/g)/g+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2))/(x
+f/g))*b-1/(d*g-e*f)/(a*g^2-b*f*g+c*f^2)/((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*ln(((b*g-2*c*f)*(x+f/g)/g+2*(a*g^2-b*
f*g+c*f^2)/g^2+2*((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*((x+f/g)^2*c+(b*g-2*c*f)*(x+f/g)/g+(a*g^2-b*f*g+c*f^2)/g^2)^(
1/2))/(x+f/g))*c*f+e/(d*g-e*f)^2/((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*ln(((b*g-2*c*f)*(x+f/g)/g+2*(a*g^2-b*f*g+c*f^
2)/g^2+2*((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*((x+f/g)^2*c+(b*g-2*c*f)*(x+f/g)/g+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2))/(x
+f/g))-e/(d*g-e*f)^2/((a*e^2-b*d*e+c*d^2)/e^2)^(1/2)*ln(((b*e-2*c*d)*(x+d/e)/e+2*(a*e^2-b*d*e+c*d^2)/e^2+2*((a
*e^2-b*d*e+c*d^2)/e^2)^(1/2)*((x+d/e)^2*c+(b*e-2*c*d)*(x+d/e)/e+(a*e^2-b*d*e+c*d^2)/e^2)^(1/2))/(x+d/e))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {c x^{2} + b x + a} {\left (e x + d\right )} {\left (g x + f\right )}^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(e*x+d)/(g*x+f)^2/(c*x^2+b*x+a)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(c*x^2 + b*x + a)*(e*x + d)*(g*x + f)^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {1}{{\left (f+g\,x\right )}^2\,\left (d+e\,x\right )\,\sqrt {c\,x^2+b\,x+a}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((f + g*x)^2*(d + e*x)*(a + b*x + c*x^2)^(1/2)),x)

[Out]

int(1/((f + g*x)^2*(d + e*x)*(a + b*x + c*x^2)^(1/2)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (d + e x\right ) \left (f + g x\right )^{2} \sqrt {a + b x + c x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(e*x+d)/(g*x+f)**2/(c*x**2+b*x+a)**(1/2),x)

[Out]

Integral(1/((d + e*x)*(f + g*x)**2*sqrt(a + b*x + c*x**2)), x)

________________________________________________________________________________________